<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .inpt{
            height: 40px;
            width: 420px;
            border: 2px solid red;
        }
        .inpt input{
            height: 38px;
            width: 416px;
            outline: none;
            border: none;
            font-size: 25px;
            color: #ccc;
        }
    </style>
</head>
<body>
    <div class="inpt">
        <input type="text" name="" id="input" value="我是sb">
    </div>
    <script>
        var input = document.getElementById('input');
        input.onfocus = function(){
            this.value='';
            this.style.color='black';
        }
        input.onblur = function(){
            this.value='我是sb';
            this.style.color='#ccc';
        }

    </script>
</body>
</html>